This chapter describes Color QuickDraw, the version of QuickDraw that provides a range of color and grayscale capabilities to your application. You should read this chapter if your application needs to use shades of gray or more colors than the eight predefined colors provided by basic QuickDraw.
Read this chapter to learn how to set up and manage a color graphics port --the sophisticated drawing environment available on Macintosh computers that support Color QuickDraw. You should also read this chapter to learn how to draw using many more colors than are available with basic QuickDraw's eight-color system.
Color QuickDraw supports all of the routines described in the previous chapters of this book. For a color graphics port, for example, you can use the ScrollRect and SetOrigin procedures, which are described in the chapter "Basic QuickDraw." Furthermore, you can use the drawing routines described in the chapter "QuickDraw Drawing" to draw with the sophisticated color and grayscale capabilities available to color graphics ports. For example, after creating an RGBColor record that describes a medium shade of green, you can use the Color QuickDraw procedure RGBForeColor to make that color the foreground color. Then, when you use the FrameRect procedure, Color QuickDraw draws the outline for your rectangle with your specified shade of green.
To prevent the choppiness that can occur when you build a complex color image onscreen, your application typically should prepare the image in an offscreen graphics world and then copy it to an onscreen color graphics port as described in the chapter "Offscreen Graphics Worlds." If you want to optimize your application's drawing for screens with different color capabilities, see the chapter "Graphics Devices."
This chapter describes color graphics ports and Color QuickDraw's routines for drawing in color. For many applications, Color QuickDraw provides a device-independent interface: draw colors in the color graphics port for a window, and Color QuickDraw automatically manages the path to the screen. If your application needs more control over its color environment, Macintosh system software provides additional graphics managers to enhance your application's color-handling abilities. These managers are described in Inside Macintosh: Advanced Color Imaging , which shows you how to